/*     */ package com.zimbra.cs.account;
/*     */ 
/*     */ import com.zimbra.common.service.ServiceException;
/*     */ import com.zimbra.common.service.ServiceException.Argument;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class AccountServiceException
/*     */   extends ServiceException
/*     */ {
/*     */   public static final String AUTH_FAILED = "account.AUTH_FAILED";
/*     */   public static final String CHANGE_PASSWORD = "account.CHANGE_PASSWORD";
/*     */   public static final String PASSWORD_LOCKED = "account.PASSWORD_LOCKED";
/*     */   public static final String PASSWORD_CHANGE_TOO_SOON = "account.PASSWORD_CHANGE_TOO_SOON";
/*     */   public static final String PASSWORD_RECENTLY_USED = "account.PASSWORD_RECENTLY_USED";
/*     */   public static final String INVALID_PASSWORD = "account.INVALID_PASSWORD";
/*     */   public static final String INVALID_ATTR_NAME = "account.INVALID_ATTR_NAME";
/*     */   public static final String INVALID_ATTR_VALUE = "account.INVALID_ATTR_VALUE";
/*     */   public static final String MULTIPLE_ACCOUNTS_MATCHED = "account.MULTIPLE_ACCOUNTS_MATCHED";
/*     */   public static final String MULTIPLE_DOMAINS_MATCHED = "account.MULTIPLE_DOMAINS_MATCHED";
/*     */   public static final String MULTIPLE_ENTRIES_MATCHED = "account.MULTIPLE_ENTRIES_MATCHED";
/*     */   public static final String NO_SMIME_CONFIG = "account.NO_SMIME_CONFIG";
/*     */   public static final String NO_SUCH_ACCOUNT = "account.NO_SUCH_ACCOUNT";
/*     */   public static final String NO_SUCH_ALIAS = "account.NO_SUCH_ALIAS";
/*     */   public static final String NO_SUCH_DOMAIN = "account.NO_SUCH_DOMAIN";
/*     */   public static final String NO_SUCH_COS = "account.NO_SUCH_COS";
/*     */   public static final String NO_SUCH_GRANT = "account.NO_SUCH_GRANT";
/*     */   public static final String NO_SUCH_IDENTITY = "account.NO_SUCH_IDENTITY";
/*     */   public static final String NO_SUCH_SIGNATURE = "account.NO_SUCH_SIGNATURE";
/*     */   public static final String NO_SUCH_DATA_SOURCE = "account.NO_SUCH_DATA_SOURCE";
/*     */   public static final String NO_SUCH_RIGHT = "account.NO_SUCH_RIGHT";
/*     */   public static final String NO_SUCH_SERVER = "account.NO_SUCH_SERVER";
/*     */   public static final String NO_SUCH_ALWAYSONCLUSTER = "account.NO_SUCH_ALWAYSONCLUSTER";
/*     */   public static final String NO_SUCH_UC_SERVICE = "account.NO_SUCH_UC_SERVICE";
/*     */   public static final String NO_SUCH_SHARE_LOCATOR = "account.NO_SUCH_SHARE_LOCATOR";
/*     */   public static final String NO_SUCH_ZIMLET = "account.NO_SUCH_ZIMLET";
/*     */   public static final String NO_SUCH_XMPP_COMPONENT = "account.NO_SUCH_XMPP_COMPONENT";
/*     */   public static final String NO_SUCH_DISTRIBUTION_LIST = "account.NO_SUCH_DISTRIBUTION_LIST";
/*     */   public static final String NO_SUCH_GROUP = "account.NO_SUCH_GROUP";
/*     */   public static final String NO_SUCH_CALENDAR_RESOURCE = "account.NO_SUCH_CALENDAR_RESOURCE";
/*     */   public static final String NO_SUCH_EXTERNAL_ENTRY = "account.NO_SUCH_EXTERNAL_ENTRY";
/*     */   public static final String MEMBER_EXISTS = "account.MEMBER_EXISTS";
/*     */   public static final String NO_SUCH_MEMBER = "account.NO_SUCH_MEMBER";
/*     */   public static final String ACCOUNT_EXISTS = "account.ACCOUNT_EXISTS";
/*     */   public static final String DOMAIN_EXISTS = "account.DOMAIN_EXISTS";
/*     */   public static final String DOMAIN_NOT_EMPTY = "account.DOMAIN_NOT_EMPTY";
/*     */   public static final String COS_EXISTS = "account.COS_EXISTS";
/*     */   public static final String RIGHT_EXISTS = "account.RIGHT_EXISTS";
/*     */   public static final String SERVER_EXISTS = "account.SERVER_EXISTS";
/*     */   public static final String ALWAYSONCLUSTER_EXISTS = "account.ALWAYSONCLUSTER_EXISTS";
/*     */   public static final String SHARE_LOCATOR_EXISTS = "account.SHARE_LOCATOR_EXISTS";
/*     */   public static final String ZIMLET_EXISTS = "account.ZIMLET_EXISTS";
/*     */   public static final String DISTRIBUTION_LIST_EXISTS = "account.DISTRIBUTION_LIST_EXISTS";
/*     */   public static final String UC_SERVICE_EXISTS = "account.UC_SERVICE_EXISTS";
/*     */   public static final String MAINTENANCE_MODE = "account.MAINTENANCE_MODE";
/*     */   public static final String ACCOUNT_INACTIVE = "account.ACCOUNT_INACTIVE";
/*     */   public static final String IDENTITY_EXISTS = "account.IDENTITY_EXISTS";
/*     */   public static final String TOO_MANY_IDENTITIES = "account.TOO_MANY_IDENTITIES";
/*     */   public static final String SIGNATURE_EXISTS = "account.SIGNATURE_EXISTS";
/*     */   public static final String TOO_MANY_SIGNATURES = "account.TOO_MANY_SIGNATURES";
/*     */   public static final String DATA_SOURCE_EXISTS = "account.DATA_SOURCE_EXISTS";
/*     */   public static final String IM_COMPONENT_EXISTS = "account.IM_COMPONENT_EXISTS";
/*     */   public static final String TOO_MANY_DATA_SOURCES = "account.TOO_MANY_DATA_SOURCES";
/*     */   public static final String TOO_MANY_ACCOUNTS = "account.TOO_MANY_ACCOUNTS";
/*     */   public static final String TOO_MANY_SEARCH_RESULTS = "account.TOO_MANY_SEARCH_RESULTS";
/*     */   public static final String TOO_MANY_TRUSTED_SENDERS = "account.TOO_MANY_TRUSTED_SENDERS";
/*     */   
/*     */   private AccountServiceException(String message, String code, boolean isReceiversFault)
/*     */   {
/*  91 */     super(message, code, isReceiversFault, new ServiceException.Argument[0]);
/*     */   }
/*     */   
/*     */   protected AccountServiceException(String message, String code, boolean isReceiversFault, Throwable cause) {
/*  95 */     super(message, code, isReceiversFault, cause, new ServiceException.Argument[0]);
/*     */   }
/*     */   
/*     */   protected AccountServiceException(String message, String code, boolean isReceiversFault, Throwable cause, ServiceException.Argument... arguments) {
/*  99 */     super(message, code, isReceiversFault, cause, arguments);
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */   public static class AuthFailedServiceException
/*     */     extends AccountServiceException
/*     */   {
/*     */     private final String mReason;
/*     */     
/*     */ 
/*     */     private final String mAcctName;
/*     */     
/*     */ 
/*     */ 
/*     */     private AuthFailedServiceException(String acctName, String namePassedIn, String reason, String code, boolean isReceiversFault, Throwable cause)
/*     */     {
/* 117 */       super(code, isReceiversFault, cause);
/* 118 */       this.mReason = reason;
/* 119 */       this.mAcctName = acctName;
/*     */     }
/*     */     
/*     */     public String getReason() {
/* 123 */       return this.mReason == null ? "" : this.mReason;
/*     */     }
/*     */     
/*     */     public String getReason(String format) {
/* 127 */       if (this.mReason == null) {
/* 128 */         return "";
/*     */       }
/* 130 */       return String.format(format, new Object[] { this.mReason });
/*     */     }
/*     */     
/*     */     public static AuthFailedServiceException AUTH_FAILED(String acctName, String namePassedIn) {
/* 134 */       return AUTH_FAILED(acctName, namePassedIn, null, null);
/*     */     }
/*     */     
/*     */     public static AuthFailedServiceException AUTH_FAILED(String acctName, String namePassedIn, String reason) {
/* 138 */       return AUTH_FAILED(acctName, namePassedIn, reason, null);
/*     */     }
/*     */     
/*     */     public static AuthFailedServiceException AUTH_FAILED(String acctName, String namePassedIn, String reason, Throwable t) {
/* 142 */       return new AuthFailedServiceException(acctName, namePassedIn, reason, "account.AUTH_FAILED", false, t);
/*     */     }
/*     */     
/*     */     public static AuthFailedServiceException AUTH_FAILED(String namePassedIn, String reason, Throwable t) {
/* 146 */       return new AuthFailedServiceException("N/A", namePassedIn, reason, "account.AUTH_FAILED", false, t);
/*     */     }
/*     */     
/*     */     public static AuthFailedServiceException AUTH_FAILED(String reason, Throwable t) {
/* 150 */       return new AuthFailedServiceException("N/A", "N/A", reason, "account.AUTH_FAILED", false, t);
/*     */     }
/*     */     
/*     */     public static AuthFailedServiceException AUTH_FAILED(String reason) {
/* 154 */       return new AuthFailedServiceException("N/A", "N/A", reason, "account.AUTH_FAILED", false, null);
/*     */     }
/*     */   }
/*     */   
/*     */   public static AccountServiceException CHANGE_PASSWORD() {
/* 159 */     return new AccountServiceException("must change password", "account.CHANGE_PASSWORD", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException PASSWORD_LOCKED() {
/* 163 */     return new AccountServiceException("password is locked and can't be changed", "account.PASSWORD_LOCKED", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException MULTIPLE_ACCOUNTS_MATCHED(String desc) {
/* 167 */     return new AccountServiceException("lookup returned multiple accounts: " + desc, "account.MULTIPLE_ACCOUNTS_MATCHED", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException MULTIPLE_DOMAINS_MATCHED(String desc)
/*     */   {
/* 172 */     return new AccountServiceException("lookup returned multiple domains: " + desc, "account.MULTIPLE_DOMAINS_MATCHED", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException MULTIPLE_ENTRIES_MATCHED(String desc, Throwable t) {
/* 176 */     return new AccountServiceException("lookup returned multiple entries: " + desc, "account.MULTIPLE_ENTRIES_MATCHED", false, t);
/*     */   }
/*     */   
/*     */   public static AccountServiceException PASSWORD_CHANGE_TOO_SOON() {
/* 180 */     return new AccountServiceException("password can't be changed yet", "account.PASSWORD_CHANGE_TOO_SOON", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException INVALID_PASSWORD(String desc) {
/* 184 */     return new AccountServiceException("invalid password: " + desc, "account.INVALID_PASSWORD", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException INVALID_PASSWORD(String desc, ServiceException.Argument... arguments) {
/* 188 */     return new AccountServiceException("invalid password: " + desc, "account.INVALID_PASSWORD", false, null, arguments);
/*     */   }
/*     */   
/*     */   public static AccountServiceException INVALID_ATTR_NAME(String msg, Throwable t) {
/* 192 */     return new AccountServiceException(msg, "account.INVALID_ATTR_NAME", false, t);
/*     */   }
/*     */   
/*     */   public static AccountServiceException INVALID_ATTR_VALUE(String msg, Throwable t) {
/* 196 */     return new AccountServiceException(msg, "account.INVALID_ATTR_VALUE", false, t);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SMIME_CONFIG(String desc) {
/* 200 */     return new AccountServiceException("no SMIME config: " + desc, "account.NO_SMIME_CONFIG", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_ACCOUNT(String name) {
/* 204 */     return new AccountServiceException("no such account: " + name, "account.NO_SUCH_ACCOUNT", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_ALIAS(String name) {
/* 208 */     return new AccountServiceException("no such alias: " + name, "account.NO_SUCH_ALIAS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_DOMAIN(String name) {
/* 212 */     return new AccountServiceException("no such domain: " + name, "account.NO_SUCH_DOMAIN", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException DOMAIN_NOT_EMPTY(String name, Exception e) {
/* 216 */     return new AccountServiceException("domain not empty: " + name, "account.DOMAIN_NOT_EMPTY", false, e);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_COS(String name) {
/* 220 */     return new AccountServiceException("no such cos: " + name, "account.NO_SUCH_COS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_SHARE_LOCATOR(String id) {
/* 224 */     return new AccountServiceException("no such share locator: " + id, "account.NO_SUCH_SHARE_LOCATOR", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_GRANT(String grant) {
/* 228 */     return new AccountServiceException("no such grant: " + grant, "account.NO_SUCH_GRANT", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_RIGHT(String name) {
/* 232 */     return new AccountServiceException("no such right: " + name, "account.NO_SUCH_RIGHT", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_SERVER(String name) {
/* 236 */     return new AccountServiceException("no such server: " + name, "account.NO_SUCH_SERVER", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_ALWAYSONCLUSTER(String name) {
/* 240 */     return new AccountServiceException("no such alwaysoncluster: " + name, "account.NO_SUCH_ALWAYSONCLUSTER", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_UC_SERVICE(String name) {
/* 244 */     return new AccountServiceException("no such uc service: " + name, "account.NO_SUCH_UC_SERVICE", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_IDENTITY(String name) {
/* 248 */     return new AccountServiceException("no such identity: " + name, "account.NO_SUCH_IDENTITY", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_SIGNATURE(String name) {
/* 252 */     return new AccountServiceException("no such signature: " + name, "account.NO_SUCH_SIGNATURE", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_DATA_SOURCE(String id) {
/* 256 */     return new AccountServiceException("no such data source: " + id, "account.NO_SUCH_DATA_SOURCE", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_ZIMLET(String name) {
/* 260 */     return new AccountServiceException("no such zimlet: " + name, "account.NO_SUCH_ZIMLET", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_XMPP_COMPONENT(String name) {
/* 264 */     return new AccountServiceException("no such xmpp component: " + name, "account.NO_SUCH_XMPP_COMPONENT", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_DISTRIBUTION_LIST(String name) {
/* 268 */     return new AccountServiceException("no such distribution list: " + name, "account.NO_SUCH_DISTRIBUTION_LIST", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_GROUP(String name)
/*     */   {
/* 273 */     return new AccountServiceException("no such group: " + name, "account.NO_SUCH_GROUP", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_CALENDAR_RESOURCE(String name)
/*     */   {
/* 278 */     return new AccountServiceException("no such calendar resource: " + name, "account.NO_SUCH_CALENDAR_RESOURCE", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_EXTERNAL_ENTRY(String name)
/*     */   {
/* 283 */     return new AccountServiceException("no such external entry: " + name, "account.NO_SUCH_EXTERNAL_ENTRY", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException NO_SUCH_MEMBER(String dlName, String members)
/*     */   {
/* 288 */     return new AccountServiceException("non-existent members: " + members + " in distribution list: " + dlName, "account.NO_SUCH_MEMBER", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException ACCOUNT_EXISTS(String name) {
/* 292 */     return new AccountServiceException("email address already exists: " + name, "account.ACCOUNT_EXISTS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException ACCOUNT_EXISTS(String name, String atDn, Throwable t) {
/* 296 */     return new AccountServiceException("email address already exists: " + name + ", at DN: " + atDn, "account.ACCOUNT_EXISTS", false, t);
/*     */   }
/*     */   
/*     */   public static AccountServiceException DOMAIN_EXISTS(String name) {
/* 300 */     return new AccountServiceException("domain already exists: " + name, "account.DOMAIN_EXISTS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException COS_EXISTS(String name) {
/* 304 */     return new AccountServiceException("cos already exists: " + name, "account.COS_EXISTS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException RIGHT_EXISTS(String name) {
/* 308 */     return new AccountServiceException("right already exists: " + name, "account.RIGHT_EXISTS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException SERVER_EXISTS(String name) {
/* 312 */     return new AccountServiceException("server already exists: " + name, "account.SERVER_EXISTS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException ALWAYSONCLUSTER_EXISTS(String name) {
/* 316 */     return new AccountServiceException("alwaysOnCluster already exists: " + name, "account.ALWAYSONCLUSTER_EXISTS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException SHARE_LOCATOR_EXISTS(String id) {
/* 320 */     return new AccountServiceException("share locator already exists: " + id, "account.SHARE_LOCATOR_EXISTS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException ZIMLET_EXISTS(String name) {
/* 324 */     return new AccountServiceException("zimlet already exists: " + name, "account.ZIMLET_EXISTS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException DISTRIBUTION_LIST_EXISTS(String name) {
/* 328 */     return new AccountServiceException("email address already exists: " + name, "account.DISTRIBUTION_LIST_EXISTS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException IDENTITY_EXISTS(String name) {
/* 332 */     return new AccountServiceException("identity already exists: " + name, "account.IDENTITY_EXISTS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException UC_SERVICE_EXISTS(String name) {
/* 336 */     return new AccountServiceException("uc service already exists: " + name, "account.UC_SERVICE_EXISTS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException TOO_MANY_IDENTITIES() {
/* 340 */     return new AccountServiceException("too many identities. can't create any more", "account.TOO_MANY_IDENTITIES", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException SIGNATURE_EXISTS(String name) {
/* 344 */     return new AccountServiceException("signature already exists: " + name, "account.SIGNATURE_EXISTS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException TOO_MANY_SIGNATURES() {
/* 348 */     return new AccountServiceException("too many signatures. can't create any more", "account.TOO_MANY_SIGNATURES", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException DATA_SOURCE_EXISTS(String name) {
/* 352 */     return new AccountServiceException("data source already exists: " + name, "account.DATA_SOURCE_EXISTS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException TOO_MANY_DATA_SOURCES() {
/* 356 */     return new AccountServiceException("too many data sources. can't create any more", "account.TOO_MANY_DATA_SOURCES", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException IM_COMPONENT_EXISTS(String name) {
/* 360 */     return new AccountServiceException("IM Component already exists: " + name, "account.IM_COMPONENT_EXISTS", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException MAINTENANCE_MODE() {
/* 364 */     return new AccountServiceException("account is in maintenance mode", "account.MAINTENANCE_MODE", true, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException ACCOUNT_INACTIVE(String name) {
/* 368 */     return new AccountServiceException("account is not active:" + name, "account.ACCOUNT_INACTIVE", true, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException PASSWORD_RECENTLY_USED() {
/* 372 */     return new AccountServiceException("password was recently used", "account.PASSWORD_RECENTLY_USED", false, null);
/*     */   }
/*     */   
/*     */   public static AccountServiceException TOO_MANY_ACCOUNTS(String str) {
/* 376 */     return new AccountServiceException("number of accounts reached the limit: " + str, "account.TOO_MANY_ACCOUNTS", true);
/*     */   }
/*     */   
/*     */   public static AccountServiceException TOO_MANY_SEARCH_RESULTS(String str, Exception e) {
/* 380 */     return new AccountServiceException("number of results exceeded the limit: " + str, "account.TOO_MANY_SEARCH_RESULTS", true, e);
/*     */   }
/*     */   
/*     */   public static AccountServiceException TOO_MANY_TRUSTED_SENDERS(String message) {
/* 384 */     return new AccountServiceException(message, "account.TOO_MANY_TRUSTED_SENDERS", false, null);
/*     */   }
/*     */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/account/AccountServiceException.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */